Integrand size = 31, antiderivative size = 659 \[ \int \frac {\tan ^m(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^4} \, dx=\frac {\left (a^4 A-6 a^2 A b^2+A b^4+4 a^3 b B-4 a b^3 B\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1+m}{2},\frac {3+m}{2},-\tan ^2(c+d x)\right ) \tan ^{1+m}(c+d x)}{\left (a^2+b^2\right )^4 d (1+m)}-\frac {b \left (a b^6 B m \left (1-m^2\right )+3 a^2 A b^5 m \left (2-5 m+m^2\right )+A b^7 m \left (2-3 m+m^2\right )+3 a^3 b^4 B \left (2+5 m+2 m^2-m^3\right )+a^7 B \left (6-11 m+6 m^2-m^3\right )-a^6 A b \left (24-26 m+9 m^2-m^3\right )+3 a^4 A b^3 \left (8+10 m-7 m^2+m^3\right )-3 a^5 b^2 B \left (12-m-4 m^2+m^3\right )\right ) \operatorname {Hypergeometric2F1}\left (1,1+m,2+m,-\frac {b \tan (c+d x)}{a}\right ) \tan ^{1+m}(c+d x)}{6 a^4 \left (a^2+b^2\right )^4 d (1+m)}-\frac {\left (4 a^3 A b-4 a A b^3-a^4 B+6 a^2 b^2 B-b^4 B\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {2+m}{2},\frac {4+m}{2},-\tan ^2(c+d x)\right ) \tan ^{2+m}(c+d x)}{\left (a^2+b^2\right )^4 d (2+m)}+\frac {b (A b-a B) \tan ^{1+m}(c+d x)}{3 a \left (a^2+b^2\right ) d (a+b \tan (c+d x))^3}+\frac {b \left (A b^3 (2-m)-a^3 B (5-m)+a^2 A b (8-m)+a b^2 B (1+m)\right ) \tan ^{1+m}(c+d x)}{6 a^2 \left (a^2+b^2\right )^2 d (a+b \tan (c+d x))^2}+\frac {b \left (a b^4 B \left (1-m^2\right )+2 a^3 b^2 B \left (7+3 m-m^2\right )+a^4 A b \left (26-9 m+m^2\right )+2 a^2 A b^3 \left (2-6 m+m^2\right )-a^5 B \left (11-6 m+m^2\right )+A b^5 \left (2-3 m+m^2\right )\right ) \tan ^{1+m}(c+d x)}{6 a^3 \left (a^2+b^2\right )^3 d (a+b \tan (c+d x))} \]
(A*a^4-6*A*a^2*b^2+A*b^4+4*B*a^3*b-4*B*a*b^3)*hypergeom([1, 1/2+1/2*m],[3/ 2+1/2*m],-tan(d*x+c)^2)*tan(d*x+c)^(1+m)/(a^2+b^2)^4/d/(1+m)-1/6*b*(a*b^6* B*m*(-m^2+1)+3*a^2*A*b^5*m*(m^2-5*m+2)+A*b^7*m*(m^2-3*m+2)+3*a^3*b^4*B*(-m ^3+2*m^2+5*m+2)+a^7*B*(-m^3+6*m^2-11*m+6)-a^6*A*b*(-m^3+9*m^2-26*m+24)+3*a ^4*A*b^3*(m^3-7*m^2+10*m+8)-3*a^5*b^2*B*(m^3-4*m^2-m+12))*hypergeom([1, 1+ m],[2+m],-b*tan(d*x+c)/a)*tan(d*x+c)^(1+m)/a^4/(a^2+b^2)^4/d/(1+m)-(4*A*a^ 3*b-4*A*a*b^3-B*a^4+6*B*a^2*b^2-B*b^4)*hypergeom([1, 1+1/2*m],[2+1/2*m],-t an(d*x+c)^2)*tan(d*x+c)^(2+m)/(a^2+b^2)^4/d/(2+m)+1/3*b*(A*b-B*a)*tan(d*x+ c)^(1+m)/a/(a^2+b^2)/d/(a+b*tan(d*x+c))^3+1/6*b*(A*b^3*(2-m)-a^3*B*(5-m)+a ^2*A*b*(8-m)+a*b^2*B*(1+m))*tan(d*x+c)^(1+m)/a^2/(a^2+b^2)^2/d/(a+b*tan(d* x+c))^2+1/6*b*(a*b^4*B*(-m^2+1)+2*a^3*b^2*B*(-m^2+3*m+7)+a^4*A*b*(m^2-9*m+ 26)+2*a^2*A*b^3*(m^2-6*m+2)-a^5*B*(m^2-6*m+11)+A*b^5*(m^2-3*m+2))*tan(d*x+ c)^(1+m)/a^3/(a^2+b^2)^3/d/(a+b*tan(d*x+c))
Leaf count is larger than twice the leaf count of optimal. \(1425\) vs. \(2(659)=1318\).
Time = 6.47 (sec) , antiderivative size = 1425, normalized size of antiderivative = 2.16 \[ \int \frac {\tan ^m(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^4} \, dx =\text {Too large to display} \]
(b*(A*b - a*B)*Tan[c + d*x]^(1 + m))/(3*a*(a^2 + b^2)*d*(a + b*Tan[c + d*x ])^3) + (((-(a*(-3*a*b*(A*b - a*B) - a*b*(A*b - a*B)*(2 - m))) + b^2*(3*a^ 2*A + A*b^2*(2 - m) + a*b*B*(1 + m)))*Tan[c + d*x]^(1 + m))/(2*a*(a^2 + b^ 2)*d*(a + b*Tan[c + d*x])^2) + (((b^2*(-(a^2*b*(A*b - a*B)*(5 - m)*(1 + m) ) + (2*a^2 + b^2*(1 - m))*(3*a^2*A + A*b^2*(2 - m) + a*b*B*(1 + m))) - a*( -6*a^2*b*(2*a*A*b - a^2*B + b^2*B) - a*b*(1 - m)*(A*b^3*(2 - m) - a^3*B*(5 - m) + a^2*A*b*(8 - m) + a*b^2*B*(1 + m))))*Tan[c + d*x]^(1 + m))/(a*(a^2 + b^2)*d*(a + b*Tan[c + d*x])) + (((a^2*b*(6*a^3*(2*a*A*b - a^2*B + b^2*B ) - b^2*(1 - m)*(A*b^3*(2 - m) - a^3*B*(5 - m) + a^2*A*b*(8 - m) + a*b^2*B *(1 + m)) + b*(-(a^2*b*(A*b - a*B)*(5 - m)*(1 + m)) + (2*a^2 + b^2*(1 - m) )*(3*a^2*A + A*b^2*(2 - m) + a*b*B*(1 + m)))) - a^2*m*(b^2*(-(a^2*b*(A*b - a*B)*(5 - m)*(1 + m)) + (2*a^2 + b^2*(1 - m))*(3*a^2*A + A*b^2*(2 - m) + a*b*B*(1 + m))) - a*(-6*a^2*b*(2*a*A*b - a^2*B + b^2*B) - a*b*(1 - m)*(A*b ^3*(2 - m) - a^3*B*(5 - m) + a^2*A*b*(8 - m) + a*b^2*B*(1 + m)))) + b^2*(( a^2 - b^2*m)*(-(a^2*b*(A*b - a*B)*(5 - m)*(1 + m)) + (2*a^2 + b^2*(1 - m)) *(3*a^2*A + A*b^2*(2 - m) + a*b*B*(1 + m))) + a*(1 + m)*(-6*a^2*b*(2*a*A*b - a^2*B + b^2*B) - a*b*(1 - m)*(A*b^3*(2 - m) - a^3*B*(5 - m) + a^2*A*b*( 8 - m) + a*b^2*B*(1 + m)))))*Hypergeometric2F1[1, 1 + m, 2 + m, -((b*Tan[c + d*x])/a)]*Tan[c + d*x]^(1 + m))/(a*(a^2 + b^2)*d*(1 + m)) + ((6*a^7*A*H ypergeometric2F1[1, (1 + m)/2, (3 + m)/2, -Tan[c + d*x]^2]*Tan[c + d*x]...
Time = 4.06 (sec) , antiderivative size = 704, normalized size of antiderivative = 1.07, number of steps used = 19, number of rules used = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.581, Rules used = {3042, 4092, 3042, 4132, 25, 3042, 4132, 25, 3042, 4136, 27, 3042, 4021, 3042, 3957, 278, 4117, 74}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\tan ^m(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\tan (c+d x)^m (A+B \tan (c+d x))}{(a+b \tan (c+d x))^4}dx\) |
\(\Big \downarrow \) 4092 |
\(\displaystyle \frac {\int \frac {\tan ^m(c+d x) \left (3 A a^2+b B (m+1) a-3 (A b-a B) \tan (c+d x) a+b (A b-a B) (2-m) \tan ^2(c+d x)+A b^2 (2-m)\right )}{(a+b \tan (c+d x))^3}dx}{3 a \left (a^2+b^2\right )}+\frac {b (A b-a B) \tan ^{m+1}(c+d x)}{3 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {\tan (c+d x)^m \left (3 A a^2+b B (m+1) a-3 (A b-a B) \tan (c+d x) a+b (A b-a B) (2-m) \tan (c+d x)^2+A b^2 (2-m)\right )}{(a+b \tan (c+d x))^3}dx}{3 a \left (a^2+b^2\right )}+\frac {b (A b-a B) \tan ^{m+1}(c+d x)}{3 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^3}\) |
\(\Big \downarrow \) 4132 |
\(\displaystyle \frac {\frac {\int -\frac {\tan ^m(c+d x) \left (b (A b-a B) (5-m) (m+1) a^2+6 \left (-B a^2+2 A b a+b^2 B\right ) \tan (c+d x) a^2-b (1-m) \left (-B (5-m) a^3+A b (8-m) a^2+b^2 B (m+1) a+A b^3 (2-m)\right ) \tan ^2(c+d x)-\left (2 a^2+b^2 (1-m)\right ) \left (3 A a^2+b B (m+1) a+A b^2 (2-m)\right )\right )}{(a+b \tan (c+d x))^2}dx}{2 a \left (a^2+b^2\right )}+\frac {b \left (a^3 (-B) (5-m)+a^2 A b (8-m)+a b^2 B (m+1)+A b^3 (2-m)\right ) \tan ^{m+1}(c+d x)}{2 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^2}}{3 a \left (a^2+b^2\right )}+\frac {b (A b-a B) \tan ^{m+1}(c+d x)}{3 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^3}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {b \left (a^3 (-B) (5-m)+a^2 A b (8-m)+a b^2 B (m+1)+A b^3 (2-m)\right ) \tan ^{m+1}(c+d x)}{2 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^2}-\frac {\int \frac {\tan ^m(c+d x) \left (b (A b-a B) (5-m) (m+1) a^2+6 \left (-B a^2+2 A b a+b^2 B\right ) \tan (c+d x) a^2-b (1-m) \left (-B (5-m) a^3+A b (8-m) a^2+b^2 B (m+1) a+A b^3 (2-m)\right ) \tan ^2(c+d x)-\left (2 a^2+b^2 (1-m)\right ) \left (3 A a^2+b B (m+1) a+A b^2 (2-m)\right )\right )}{(a+b \tan (c+d x))^2}dx}{2 a \left (a^2+b^2\right )}}{3 a \left (a^2+b^2\right )}+\frac {b (A b-a B) \tan ^{m+1}(c+d x)}{3 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {b \left (a^3 (-B) (5-m)+a^2 A b (8-m)+a b^2 B (m+1)+A b^3 (2-m)\right ) \tan ^{m+1}(c+d x)}{2 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^2}-\frac {\int \frac {\tan (c+d x)^m \left (b (A b-a B) (5-m) (m+1) a^2+6 \left (-B a^2+2 A b a+b^2 B\right ) \tan (c+d x) a^2-b (1-m) \left (-B (5-m) a^3+A b (8-m) a^2+b^2 B (m+1) a+A b^3 (2-m)\right ) \tan (c+d x)^2-\left (2 a^2+b^2 (1-m)\right ) \left (3 A a^2+b B (m+1) a+A b^2 (2-m)\right )\right )}{(a+b \tan (c+d x))^2}dx}{2 a \left (a^2+b^2\right )}}{3 a \left (a^2+b^2\right )}+\frac {b (A b-a B) \tan ^{m+1}(c+d x)}{3 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^3}\) |
\(\Big \downarrow \) 4132 |
\(\displaystyle \frac {\frac {b \left (a^3 (-B) (5-m)+a^2 A b (8-m)+a b^2 B (m+1)+A b^3 (2-m)\right ) \tan ^{m+1}(c+d x)}{2 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^2}-\frac {\frac {\int -\frac {\tan ^m(c+d x) \left (6 A a^6+b B \left (m^3-6 m^2+11 m+18\right ) a^5-A b^2 \left (m^3-9 m^2+26 m+18\right ) a^4-2 b^3 B \left (-m^3+3 m^2+7 m+3\right ) a^3-6 \left (-B a^3+3 A b a^2+3 b^2 B a-A b^3\right ) \tan (c+d x) a^3-2 A b^4 m \left (m^2-6 m+2\right ) a^2-b^5 B m \left (1-m^2\right ) a-b m \left (-B \left (m^2-6 m+11\right ) a^5+A b \left (m^2-9 m+26\right ) a^4+2 b^2 B \left (-m^2+3 m+7\right ) a^3+2 A b^3 \left (m^2-6 m+2\right ) a^2+b^4 B \left (1-m^2\right ) a+A b^5 \left (m^2-3 m+2\right )\right ) \tan ^2(c+d x)-A b^6 m \left (m^2-3 m+2\right )\right )}{a+b \tan (c+d x)}dx}{a \left (a^2+b^2\right )}-\frac {b \left (a^5 (-B) \left (m^2-6 m+11\right )+a^4 A b \left (m^2-9 m+26\right )+2 a^3 b^2 B \left (-m^2+3 m+7\right )+2 a^2 A b^3 \left (m^2-6 m+2\right )+a b^4 B \left (1-m^2\right )+A b^5 \left (m^2-3 m+2\right )\right ) \tan ^{m+1}(c+d x)}{a d \left (a^2+b^2\right ) (a+b \tan (c+d x))}}{2 a \left (a^2+b^2\right )}}{3 a \left (a^2+b^2\right )}+\frac {b (A b-a B) \tan ^{m+1}(c+d x)}{3 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^3}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {b \left (a^3 (-B) (5-m)+a^2 A b (8-m)+a b^2 B (m+1)+A b^3 (2-m)\right ) \tan ^{m+1}(c+d x)}{2 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^2}-\frac {-\frac {\int \frac {\tan ^m(c+d x) \left (6 A a^6+b B \left (m^3-6 m^2+11 m+18\right ) a^5-A b^2 \left (m^3-9 m^2+26 m+18\right ) a^4-2 b^3 B \left (-m^3+3 m^2+7 m+3\right ) a^3-6 \left (-B a^3+3 A b a^2+3 b^2 B a-A b^3\right ) \tan (c+d x) a^3-2 A b^4 m \left (m^2-6 m+2\right ) a^2-b^5 B m \left (1-m^2\right ) a-b m \left (-B \left (m^2-6 m+11\right ) a^5+A b \left (m^2-9 m+26\right ) a^4+2 b^2 B \left (-m^2+3 m+7\right ) a^3+2 A b^3 \left (m^2-6 m+2\right ) a^2+b^4 B \left (1-m^2\right ) a+A b^5 \left (m^2-3 m+2\right )\right ) \tan ^2(c+d x)-A b^6 m \left (m^2-3 m+2\right )\right )}{a+b \tan (c+d x)}dx}{a \left (a^2+b^2\right )}-\frac {b \left (a^5 (-B) \left (m^2-6 m+11\right )+a^4 A b \left (m^2-9 m+26\right )+2 a^3 b^2 B \left (-m^2+3 m+7\right )+2 a^2 A b^3 \left (m^2-6 m+2\right )+a b^4 B \left (1-m^2\right )+A b^5 \left (m^2-3 m+2\right )\right ) \tan ^{m+1}(c+d x)}{a d \left (a^2+b^2\right ) (a+b \tan (c+d x))}}{2 a \left (a^2+b^2\right )}}{3 a \left (a^2+b^2\right )}+\frac {b (A b-a B) \tan ^{m+1}(c+d x)}{3 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {b \left (a^3 (-B) (5-m)+a^2 A b (8-m)+a b^2 B (m+1)+A b^3 (2-m)\right ) \tan ^{m+1}(c+d x)}{2 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^2}-\frac {-\frac {\int \frac {\tan (c+d x)^m \left (6 A a^6+b B \left (m^3-6 m^2+11 m+18\right ) a^5-A b^2 \left (m^3-9 m^2+26 m+18\right ) a^4-2 b^3 B \left (-m^3+3 m^2+7 m+3\right ) a^3-6 \left (-B a^3+3 A b a^2+3 b^2 B a-A b^3\right ) \tan (c+d x) a^3-2 A b^4 m \left (m^2-6 m+2\right ) a^2-b^5 B m \left (1-m^2\right ) a-b m \left (-B \left (m^2-6 m+11\right ) a^5+A b \left (m^2-9 m+26\right ) a^4+2 b^2 B \left (-m^2+3 m+7\right ) a^3+2 A b^3 \left (m^2-6 m+2\right ) a^2+b^4 B \left (1-m^2\right ) a+A b^5 \left (m^2-3 m+2\right )\right ) \tan (c+d x)^2-A b^6 m \left (m^2-3 m+2\right )\right )}{a+b \tan (c+d x)}dx}{a \left (a^2+b^2\right )}-\frac {b \left (a^5 (-B) \left (m^2-6 m+11\right )+a^4 A b \left (m^2-9 m+26\right )+2 a^3 b^2 B \left (-m^2+3 m+7\right )+2 a^2 A b^3 \left (m^2-6 m+2\right )+a b^4 B \left (1-m^2\right )+A b^5 \left (m^2-3 m+2\right )\right ) \tan ^{m+1}(c+d x)}{a d \left (a^2+b^2\right ) (a+b \tan (c+d x))}}{2 a \left (a^2+b^2\right )}}{3 a \left (a^2+b^2\right )}+\frac {b (A b-a B) \tan ^{m+1}(c+d x)}{3 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^3}\) |
\(\Big \downarrow \) 4136 |
\(\displaystyle \frac {\frac {b \left (a^3 (-B) (5-m)+a^2 A b (8-m)+a b^2 B (m+1)+A b^3 (2-m)\right ) \tan ^{m+1}(c+d x)}{2 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^2}-\frac {-\frac {\frac {\int 6 \tan ^m(c+d x) \left (a^3 \left (A a^4+4 b B a^3-6 A b^2 a^2-4 b^3 B a+A b^4\right )-a^3 \left (-B a^4+4 A b a^3+6 b^2 B a^2-4 A b^3 a-b^4 B\right ) \tan (c+d x)\right )dx}{a^2+b^2}-\frac {b \left (a^7 B \left (-m^3+6 m^2-11 m+6\right )-a^6 A b \left (-m^3+9 m^2-26 m+24\right )-3 a^5 b^2 B \left (m^3-4 m^2-m+12\right )+3 a^4 A b^3 \left (m^3-7 m^2+10 m+8\right )+3 a^3 b^4 B \left (-m^3+2 m^2+5 m+2\right )+3 a^2 A b^5 m \left (m^2-5 m+2\right )+a b^6 B m \left (1-m^2\right )+A b^7 m \left (m^2-3 m+2\right )\right ) \int \frac {\tan ^m(c+d x) \left (\tan ^2(c+d x)+1\right )}{a+b \tan (c+d x)}dx}{a^2+b^2}}{a \left (a^2+b^2\right )}-\frac {b \left (a^5 (-B) \left (m^2-6 m+11\right )+a^4 A b \left (m^2-9 m+26\right )+2 a^3 b^2 B \left (-m^2+3 m+7\right )+2 a^2 A b^3 \left (m^2-6 m+2\right )+a b^4 B \left (1-m^2\right )+A b^5 \left (m^2-3 m+2\right )\right ) \tan ^{m+1}(c+d x)}{a d \left (a^2+b^2\right ) (a+b \tan (c+d x))}}{2 a \left (a^2+b^2\right )}}{3 a \left (a^2+b^2\right )}+\frac {b (A b-a B) \tan ^{m+1}(c+d x)}{3 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^3}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {b \left (a^3 (-B) (5-m)+a^2 A b (8-m)+a b^2 B (m+1)+A b^3 (2-m)\right ) \tan ^{m+1}(c+d x)}{2 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^2}-\frac {-\frac {\frac {6 \int \tan ^m(c+d x) \left (a^3 \left (A a^4+4 b B a^3-6 A b^2 a^2-4 b^3 B a+A b^4\right )-a^3 \left (-B a^4+4 A b a^3+6 b^2 B a^2-4 A b^3 a-b^4 B\right ) \tan (c+d x)\right )dx}{a^2+b^2}-\frac {b \left (a^7 B \left (-m^3+6 m^2-11 m+6\right )-a^6 A b \left (-m^3+9 m^2-26 m+24\right )-3 a^5 b^2 B \left (m^3-4 m^2-m+12\right )+3 a^4 A b^3 \left (m^3-7 m^2+10 m+8\right )+3 a^3 b^4 B \left (-m^3+2 m^2+5 m+2\right )+3 a^2 A b^5 m \left (m^2-5 m+2\right )+a b^6 B m \left (1-m^2\right )+A b^7 m \left (m^2-3 m+2\right )\right ) \int \frac {\tan ^m(c+d x) \left (\tan ^2(c+d x)+1\right )}{a+b \tan (c+d x)}dx}{a^2+b^2}}{a \left (a^2+b^2\right )}-\frac {b \left (a^5 (-B) \left (m^2-6 m+11\right )+a^4 A b \left (m^2-9 m+26\right )+2 a^3 b^2 B \left (-m^2+3 m+7\right )+2 a^2 A b^3 \left (m^2-6 m+2\right )+a b^4 B \left (1-m^2\right )+A b^5 \left (m^2-3 m+2\right )\right ) \tan ^{m+1}(c+d x)}{a d \left (a^2+b^2\right ) (a+b \tan (c+d x))}}{2 a \left (a^2+b^2\right )}}{3 a \left (a^2+b^2\right )}+\frac {b (A b-a B) \tan ^{m+1}(c+d x)}{3 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {b \left (a^3 (-B) (5-m)+a^2 A b (8-m)+a b^2 B (m+1)+A b^3 (2-m)\right ) \tan ^{m+1}(c+d x)}{2 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^2}-\frac {-\frac {\frac {6 \int \tan (c+d x)^m \left (a^3 \left (A a^4+4 b B a^3-6 A b^2 a^2-4 b^3 B a+A b^4\right )-a^3 \left (-B a^4+4 A b a^3+6 b^2 B a^2-4 A b^3 a-b^4 B\right ) \tan (c+d x)\right )dx}{a^2+b^2}-\frac {b \left (a^7 B \left (-m^3+6 m^2-11 m+6\right )-a^6 A b \left (-m^3+9 m^2-26 m+24\right )-3 a^5 b^2 B \left (m^3-4 m^2-m+12\right )+3 a^4 A b^3 \left (m^3-7 m^2+10 m+8\right )+3 a^3 b^4 B \left (-m^3+2 m^2+5 m+2\right )+3 a^2 A b^5 m \left (m^2-5 m+2\right )+a b^6 B m \left (1-m^2\right )+A b^7 m \left (m^2-3 m+2\right )\right ) \int \frac {\tan (c+d x)^m \left (\tan (c+d x)^2+1\right )}{a+b \tan (c+d x)}dx}{a^2+b^2}}{a \left (a^2+b^2\right )}-\frac {b \left (a^5 (-B) \left (m^2-6 m+11\right )+a^4 A b \left (m^2-9 m+26\right )+2 a^3 b^2 B \left (-m^2+3 m+7\right )+2 a^2 A b^3 \left (m^2-6 m+2\right )+a b^4 B \left (1-m^2\right )+A b^5 \left (m^2-3 m+2\right )\right ) \tan ^{m+1}(c+d x)}{a d \left (a^2+b^2\right ) (a+b \tan (c+d x))}}{2 a \left (a^2+b^2\right )}}{3 a \left (a^2+b^2\right )}+\frac {b (A b-a B) \tan ^{m+1}(c+d x)}{3 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^3}\) |
\(\Big \downarrow \) 4021 |
\(\displaystyle \frac {\frac {b \left (a^3 (-B) (5-m)+a^2 A b (8-m)+a b^2 B (m+1)+A b^3 (2-m)\right ) \tan ^{m+1}(c+d x)}{2 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^2}-\frac {-\frac {\frac {6 \left (a^3 \left (a^4 A+4 a^3 b B-6 a^2 A b^2-4 a b^3 B+A b^4\right ) \int \tan ^m(c+d x)dx-a^3 \left (a^4 (-B)+4 a^3 A b+6 a^2 b^2 B-4 a A b^3-b^4 B\right ) \int \tan ^{m+1}(c+d x)dx\right )}{a^2+b^2}-\frac {b \left (a^7 B \left (-m^3+6 m^2-11 m+6\right )-a^6 A b \left (-m^3+9 m^2-26 m+24\right )-3 a^5 b^2 B \left (m^3-4 m^2-m+12\right )+3 a^4 A b^3 \left (m^3-7 m^2+10 m+8\right )+3 a^3 b^4 B \left (-m^3+2 m^2+5 m+2\right )+3 a^2 A b^5 m \left (m^2-5 m+2\right )+a b^6 B m \left (1-m^2\right )+A b^7 m \left (m^2-3 m+2\right )\right ) \int \frac {\tan (c+d x)^m \left (\tan (c+d x)^2+1\right )}{a+b \tan (c+d x)}dx}{a^2+b^2}}{a \left (a^2+b^2\right )}-\frac {b \left (a^5 (-B) \left (m^2-6 m+11\right )+a^4 A b \left (m^2-9 m+26\right )+2 a^3 b^2 B \left (-m^2+3 m+7\right )+2 a^2 A b^3 \left (m^2-6 m+2\right )+a b^4 B \left (1-m^2\right )+A b^5 \left (m^2-3 m+2\right )\right ) \tan ^{m+1}(c+d x)}{a d \left (a^2+b^2\right ) (a+b \tan (c+d x))}}{2 a \left (a^2+b^2\right )}}{3 a \left (a^2+b^2\right )}+\frac {b (A b-a B) \tan ^{m+1}(c+d x)}{3 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {b \left (a^3 (-B) (5-m)+a^2 A b (8-m)+a b^2 B (m+1)+A b^3 (2-m)\right ) \tan ^{m+1}(c+d x)}{2 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^2}-\frac {-\frac {\frac {6 \left (a^3 \left (a^4 A+4 a^3 b B-6 a^2 A b^2-4 a b^3 B+A b^4\right ) \int \tan (c+d x)^mdx-a^3 \left (a^4 (-B)+4 a^3 A b+6 a^2 b^2 B-4 a A b^3-b^4 B\right ) \int \tan (c+d x)^{m+1}dx\right )}{a^2+b^2}-\frac {b \left (a^7 B \left (-m^3+6 m^2-11 m+6\right )-a^6 A b \left (-m^3+9 m^2-26 m+24\right )-3 a^5 b^2 B \left (m^3-4 m^2-m+12\right )+3 a^4 A b^3 \left (m^3-7 m^2+10 m+8\right )+3 a^3 b^4 B \left (-m^3+2 m^2+5 m+2\right )+3 a^2 A b^5 m \left (m^2-5 m+2\right )+a b^6 B m \left (1-m^2\right )+A b^7 m \left (m^2-3 m+2\right )\right ) \int \frac {\tan (c+d x)^m \left (\tan (c+d x)^2+1\right )}{a+b \tan (c+d x)}dx}{a^2+b^2}}{a \left (a^2+b^2\right )}-\frac {b \left (a^5 (-B) \left (m^2-6 m+11\right )+a^4 A b \left (m^2-9 m+26\right )+2 a^3 b^2 B \left (-m^2+3 m+7\right )+2 a^2 A b^3 \left (m^2-6 m+2\right )+a b^4 B \left (1-m^2\right )+A b^5 \left (m^2-3 m+2\right )\right ) \tan ^{m+1}(c+d x)}{a d \left (a^2+b^2\right ) (a+b \tan (c+d x))}}{2 a \left (a^2+b^2\right )}}{3 a \left (a^2+b^2\right )}+\frac {b (A b-a B) \tan ^{m+1}(c+d x)}{3 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^3}\) |
\(\Big \downarrow \) 3957 |
\(\displaystyle \frac {\frac {b \left (a^3 (-B) (5-m)+a^2 A b (8-m)+a b^2 B (m+1)+A b^3 (2-m)\right ) \tan ^{m+1}(c+d x)}{2 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^2}-\frac {-\frac {\frac {6 \left (\frac {a^3 \left (a^4 A+4 a^3 b B-6 a^2 A b^2-4 a b^3 B+A b^4\right ) \int \frac {\tan ^m(c+d x)}{\tan ^2(c+d x)+1}d\tan (c+d x)}{d}-\frac {a^3 \left (a^4 (-B)+4 a^3 A b+6 a^2 b^2 B-4 a A b^3-b^4 B\right ) \int \frac {\tan ^{m+1}(c+d x)}{\tan ^2(c+d x)+1}d\tan (c+d x)}{d}\right )}{a^2+b^2}-\frac {b \left (a^7 B \left (-m^3+6 m^2-11 m+6\right )-a^6 A b \left (-m^3+9 m^2-26 m+24\right )-3 a^5 b^2 B \left (m^3-4 m^2-m+12\right )+3 a^4 A b^3 \left (m^3-7 m^2+10 m+8\right )+3 a^3 b^4 B \left (-m^3+2 m^2+5 m+2\right )+3 a^2 A b^5 m \left (m^2-5 m+2\right )+a b^6 B m \left (1-m^2\right )+A b^7 m \left (m^2-3 m+2\right )\right ) \int \frac {\tan (c+d x)^m \left (\tan (c+d x)^2+1\right )}{a+b \tan (c+d x)}dx}{a^2+b^2}}{a \left (a^2+b^2\right )}-\frac {b \left (a^5 (-B) \left (m^2-6 m+11\right )+a^4 A b \left (m^2-9 m+26\right )+2 a^3 b^2 B \left (-m^2+3 m+7\right )+2 a^2 A b^3 \left (m^2-6 m+2\right )+a b^4 B \left (1-m^2\right )+A b^5 \left (m^2-3 m+2\right )\right ) \tan ^{m+1}(c+d x)}{a d \left (a^2+b^2\right ) (a+b \tan (c+d x))}}{2 a \left (a^2+b^2\right )}}{3 a \left (a^2+b^2\right )}+\frac {b (A b-a B) \tan ^{m+1}(c+d x)}{3 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^3}\) |
\(\Big \downarrow \) 278 |
\(\displaystyle \frac {\frac {b \left (a^3 (-B) (5-m)+a^2 A b (8-m)+a b^2 B (m+1)+A b^3 (2-m)\right ) \tan ^{m+1}(c+d x)}{2 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^2}-\frac {-\frac {\frac {6 \left (\frac {a^3 \left (a^4 A+4 a^3 b B-6 a^2 A b^2-4 a b^3 B+A b^4\right ) \tan ^{m+1}(c+d x) \operatorname {Hypergeometric2F1}\left (1,\frac {m+1}{2},\frac {m+3}{2},-\tan ^2(c+d x)\right )}{d (m+1)}-\frac {a^3 \left (a^4 (-B)+4 a^3 A b+6 a^2 b^2 B-4 a A b^3-b^4 B\right ) \tan ^{m+2}(c+d x) \operatorname {Hypergeometric2F1}\left (1,\frac {m+2}{2},\frac {m+4}{2},-\tan ^2(c+d x)\right )}{d (m+2)}\right )}{a^2+b^2}-\frac {b \left (a^7 B \left (-m^3+6 m^2-11 m+6\right )-a^6 A b \left (-m^3+9 m^2-26 m+24\right )-3 a^5 b^2 B \left (m^3-4 m^2-m+12\right )+3 a^4 A b^3 \left (m^3-7 m^2+10 m+8\right )+3 a^3 b^4 B \left (-m^3+2 m^2+5 m+2\right )+3 a^2 A b^5 m \left (m^2-5 m+2\right )+a b^6 B m \left (1-m^2\right )+A b^7 m \left (m^2-3 m+2\right )\right ) \int \frac {\tan (c+d x)^m \left (\tan (c+d x)^2+1\right )}{a+b \tan (c+d x)}dx}{a^2+b^2}}{a \left (a^2+b^2\right )}-\frac {b \left (a^5 (-B) \left (m^2-6 m+11\right )+a^4 A b \left (m^2-9 m+26\right )+2 a^3 b^2 B \left (-m^2+3 m+7\right )+2 a^2 A b^3 \left (m^2-6 m+2\right )+a b^4 B \left (1-m^2\right )+A b^5 \left (m^2-3 m+2\right )\right ) \tan ^{m+1}(c+d x)}{a d \left (a^2+b^2\right ) (a+b \tan (c+d x))}}{2 a \left (a^2+b^2\right )}}{3 a \left (a^2+b^2\right )}+\frac {b (A b-a B) \tan ^{m+1}(c+d x)}{3 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^3}\) |
\(\Big \downarrow \) 4117 |
\(\displaystyle \frac {\frac {b \left (a^3 (-B) (5-m)+a^2 A b (8-m)+a b^2 B (m+1)+A b^3 (2-m)\right ) \tan ^{m+1}(c+d x)}{2 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^2}-\frac {-\frac {\frac {6 \left (\frac {a^3 \left (a^4 A+4 a^3 b B-6 a^2 A b^2-4 a b^3 B+A b^4\right ) \tan ^{m+1}(c+d x) \operatorname {Hypergeometric2F1}\left (1,\frac {m+1}{2},\frac {m+3}{2},-\tan ^2(c+d x)\right )}{d (m+1)}-\frac {a^3 \left (a^4 (-B)+4 a^3 A b+6 a^2 b^2 B-4 a A b^3-b^4 B\right ) \tan ^{m+2}(c+d x) \operatorname {Hypergeometric2F1}\left (1,\frac {m+2}{2},\frac {m+4}{2},-\tan ^2(c+d x)\right )}{d (m+2)}\right )}{a^2+b^2}-\frac {b \left (a^7 B \left (-m^3+6 m^2-11 m+6\right )-a^6 A b \left (-m^3+9 m^2-26 m+24\right )-3 a^5 b^2 B \left (m^3-4 m^2-m+12\right )+3 a^4 A b^3 \left (m^3-7 m^2+10 m+8\right )+3 a^3 b^4 B \left (-m^3+2 m^2+5 m+2\right )+3 a^2 A b^5 m \left (m^2-5 m+2\right )+a b^6 B m \left (1-m^2\right )+A b^7 m \left (m^2-3 m+2\right )\right ) \int \frac {\tan ^m(c+d x)}{a+b \tan (c+d x)}d\tan (c+d x)}{d \left (a^2+b^2\right )}}{a \left (a^2+b^2\right )}-\frac {b \left (a^5 (-B) \left (m^2-6 m+11\right )+a^4 A b \left (m^2-9 m+26\right )+2 a^3 b^2 B \left (-m^2+3 m+7\right )+2 a^2 A b^3 \left (m^2-6 m+2\right )+a b^4 B \left (1-m^2\right )+A b^5 \left (m^2-3 m+2\right )\right ) \tan ^{m+1}(c+d x)}{a d \left (a^2+b^2\right ) (a+b \tan (c+d x))}}{2 a \left (a^2+b^2\right )}}{3 a \left (a^2+b^2\right )}+\frac {b (A b-a B) \tan ^{m+1}(c+d x)}{3 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^3}\) |
\(\Big \downarrow \) 74 |
\(\displaystyle \frac {b (A b-a B) \tan ^{m+1}(c+d x)}{3 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^3}+\frac {\frac {b \left (a^3 (-B) (5-m)+a^2 A b (8-m)+a b^2 B (m+1)+A b^3 (2-m)\right ) \tan ^{m+1}(c+d x)}{2 a d \left (a^2+b^2\right ) (a+b \tan (c+d x))^2}-\frac {-\frac {b \left (a^5 (-B) \left (m^2-6 m+11\right )+a^4 A b \left (m^2-9 m+26\right )+2 a^3 b^2 B \left (-m^2+3 m+7\right )+2 a^2 A b^3 \left (m^2-6 m+2\right )+a b^4 B \left (1-m^2\right )+A b^5 \left (m^2-3 m+2\right )\right ) \tan ^{m+1}(c+d x)}{a d \left (a^2+b^2\right ) (a+b \tan (c+d x))}-\frac {\frac {6 \left (\frac {a^3 \left (a^4 A+4 a^3 b B-6 a^2 A b^2-4 a b^3 B+A b^4\right ) \tan ^{m+1}(c+d x) \operatorname {Hypergeometric2F1}\left (1,\frac {m+1}{2},\frac {m+3}{2},-\tan ^2(c+d x)\right )}{d (m+1)}-\frac {a^3 \left (a^4 (-B)+4 a^3 A b+6 a^2 b^2 B-4 a A b^3-b^4 B\right ) \tan ^{m+2}(c+d x) \operatorname {Hypergeometric2F1}\left (1,\frac {m+2}{2},\frac {m+4}{2},-\tan ^2(c+d x)\right )}{d (m+2)}\right )}{a^2+b^2}-\frac {b \left (a^7 B \left (-m^3+6 m^2-11 m+6\right )-a^6 A b \left (-m^3+9 m^2-26 m+24\right )-3 a^5 b^2 B \left (m^3-4 m^2-m+12\right )+3 a^4 A b^3 \left (m^3-7 m^2+10 m+8\right )+3 a^3 b^4 B \left (-m^3+2 m^2+5 m+2\right )+3 a^2 A b^5 m \left (m^2-5 m+2\right )+a b^6 B m \left (1-m^2\right )+A b^7 m \left (m^2-3 m+2\right )\right ) \tan ^{m+1}(c+d x) \operatorname {Hypergeometric2F1}\left (1,m+1,m+2,-\frac {b \tan (c+d x)}{a}\right )}{a d (m+1) \left (a^2+b^2\right )}}{a \left (a^2+b^2\right )}}{2 a \left (a^2+b^2\right )}}{3 a \left (a^2+b^2\right )}\) |
(b*(A*b - a*B)*Tan[c + d*x]^(1 + m))/(3*a*(a^2 + b^2)*d*(a + b*Tan[c + d*x ])^3) + ((b*(A*b^3*(2 - m) - a^3*B*(5 - m) + a^2*A*b*(8 - m) + a*b^2*B*(1 + m))*Tan[c + d*x]^(1 + m))/(2*a*(a^2 + b^2)*d*(a + b*Tan[c + d*x])^2) - ( -((b*(a*b^4*B*(1 - m^2) + 2*a^3*b^2*B*(7 + 3*m - m^2) + a^4*A*b*(26 - 9*m + m^2) + 2*a^2*A*b^3*(2 - 6*m + m^2) - a^5*B*(11 - 6*m + m^2) + A*b^5*(2 - 3*m + m^2))*Tan[c + d*x]^(1 + m))/(a*(a^2 + b^2)*d*(a + b*Tan[c + d*x]))) - (-((b*(a*b^6*B*m*(1 - m^2) + 3*a^2*A*b^5*m*(2 - 5*m + m^2) + A*b^7*m*(2 - 3*m + m^2) + 3*a^3*b^4*B*(2 + 5*m + 2*m^2 - m^3) + a^7*B*(6 - 11*m + 6* m^2 - m^3) - a^6*A*b*(24 - 26*m + 9*m^2 - m^3) + 3*a^4*A*b^3*(8 + 10*m - 7 *m^2 + m^3) - 3*a^5*b^2*B*(12 - m - 4*m^2 + m^3))*Hypergeometric2F1[1, 1 + m, 2 + m, -((b*Tan[c + d*x])/a)]*Tan[c + d*x]^(1 + m))/(a*(a^2 + b^2)*d*( 1 + m))) + (6*((a^3*(a^4*A - 6*a^2*A*b^2 + A*b^4 + 4*a^3*b*B - 4*a*b^3*B)* Hypergeometric2F1[1, (1 + m)/2, (3 + m)/2, -Tan[c + d*x]^2]*Tan[c + d*x]^( 1 + m))/(d*(1 + m)) - (a^3*(4*a^3*A*b - 4*a*A*b^3 - a^4*B + 6*a^2*b^2*B - b^4*B)*Hypergeometric2F1[1, (2 + m)/2, (4 + m)/2, -Tan[c + d*x]^2]*Tan[c + d*x]^(2 + m))/(d*(2 + m))))/(a^2 + b^2))/(a*(a^2 + b^2)))/(2*a*(a^2 + b^2 )))/(3*a*(a^2 + b^2))
3.5.86.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[c^n*((b*x )^(m + 1)/(b*(m + 1)))*Hypergeometric2F1[-n, m + 1, m + 2, (-d)*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] && !IntegerQ[m] && (IntegerQ[n] || (GtQ[c, 0] && !(EqQ[n, -2^(-1)] && EqQ[c^2 - d^2, 0] && GtQ[-d/(b*c), 0])))
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[a^p*(( c*x)^(m + 1)/(c*(m + 1)))*Hypergeometric2F1[-p, (m + 1)/2, (m + 1)/2 + 1, ( -b)*(x^2/a)], x] /; FreeQ[{a, b, c, m, p}, x] && !IGtQ[p, 0] && (ILtQ[p, 0 ] || GtQ[a, 0])
Int[((b_.)*tan[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[b/d Subst[Int [x^n/(b^2 + x^2), x], x, b*Tan[c + d*x]], x] /; FreeQ[{b, c, d, n}, x] && !IntegerQ[n]
Int[((b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*tan[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Tan[e + f*x])^m, x], x] + Simp[d/b Int [(b*Tan[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x] && NeQ[c^ 2 + d^2, 0] && !IntegerQ[2*m]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Si mp[b*(A*b - a*B)*(a + b*Tan[e + f*x])^(m + 1)*((c + d*Tan[e + f*x])^(n + 1) /(f*(m + 1)*(b*c - a*d)*(a^2 + b^2))), x] + Simp[1/((m + 1)*(b*c - a*d)*(a^ 2 + b^2)) Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Simp[b* B*(b*c*(m + 1) + a*d*(n + 1)) + A*(a*(b*c - a*d)*(m + 1) - b^2*d*(m + n + 2 )) - (A*b - a*B)*(b*c - a*d)*(m + 1)*Tan[e + f*x] - b*d*(A*b - a*B)*(m + n + 2)*Tan[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && LtQ[m, -1] && (IntegerQ[m] || IntegersQ[2*m, 2*n]) && !(ILtQ[n, -1] && ( !IntegerQ[m] || (EqQ[c, 0] && NeQ[a, 0])))
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_.)*((A_) + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[A/f Subst[Int[(a + b*x)^m*(c + d*x)^n, x], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, C, m, n}, x] && EqQ[A, C]
Int[((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(A*b^2 - a*(b*B - a*C))*(a + b*Tan[e + f*x])^(m + 1)*((c + d*Tan[e + f*x])^(n + 1)/(f*(m + 1)*(b*c - a*d)*(a^2 + b^2))), x] + Simp[1/((m + 1)*(b*c - a*d)*(a^2 + b^2)) Int[(a + b*Tan[e + f*x])^(m + 1)*(c + d*Tan[e + f*x])^n*Simp[A*(a*(b*c - a*d)*(m + 1) - b^2*d* (m + n + 2)) + (b*B - a*C)*(b*c*(m + 1) + a*d*(n + 1)) - (m + 1)*(b*c - a*d )*(A*b - a*B - b*C)*Tan[e + f*x] - d*(A*b^2 - a*(b*B - a*C))*(m + n + 2)*Ta n[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ [b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] && LtQ[m, -1] && !(ILtQ[n, -1] && ( !IntegerQ[m] || (EqQ[c, 0] && NeQ[a, 0])))
Int[(((c_.) + (d_.)*tan[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)] + (C_.)*tan[(e_.) + (f_.)*(x_)]^2))/((a_.) + (b_.)*tan[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[1/(a^2 + b^2) Int[(c + d*Tan[e + f*x])^ n*Simp[b*B + a*(A - C) + (a*B - b*(A - C))*Tan[e + f*x], x], x], x] + Simp[ (A*b^2 - a*b*B + a^2*C)/(a^2 + b^2) Int[(c + d*Tan[e + f*x])^n*((1 + Tan[ e + f*x]^2)/(a + b*Tan[e + f*x])), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 + b^2, 0] && NeQ[c^2 + d^2, 0] & & !GtQ[n, 0] && !LeQ[n, -1]
\[\int \frac {\tan \left (d x +c \right )^{m} \left (A +B \tan \left (d x +c \right )\right )}{\left (a +b \tan \left (d x +c \right )\right )^{4}}d x\]
\[ \int \frac {\tan ^m(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^4} \, dx=\int { \frac {{\left (B \tan \left (d x + c\right ) + A\right )} \tan \left (d x + c\right )^{m}}{{\left (b \tan \left (d x + c\right ) + a\right )}^{4}} \,d x } \]
integral((B*tan(d*x + c) + A)*tan(d*x + c)^m/(b^4*tan(d*x + c)^4 + 4*a*b^3 *tan(d*x + c)^3 + 6*a^2*b^2*tan(d*x + c)^2 + 4*a^3*b*tan(d*x + c) + a^4), x)
\[ \int \frac {\tan ^m(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^4} \, dx=\int \frac {\left (A + B \tan {\left (c + d x \right )}\right ) \tan ^{m}{\left (c + d x \right )}}{\left (a + b \tan {\left (c + d x \right )}\right )^{4}}\, dx \]
\[ \int \frac {\tan ^m(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^4} \, dx=\int { \frac {{\left (B \tan \left (d x + c\right ) + A\right )} \tan \left (d x + c\right )^{m}}{{\left (b \tan \left (d x + c\right ) + a\right )}^{4}} \,d x } \]
\[ \int \frac {\tan ^m(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^4} \, dx=\int { \frac {{\left (B \tan \left (d x + c\right ) + A\right )} \tan \left (d x + c\right )^{m}}{{\left (b \tan \left (d x + c\right ) + a\right )}^{4}} \,d x } \]
Timed out. \[ \int \frac {\tan ^m(c+d x) (A+B \tan (c+d x))}{(a+b \tan (c+d x))^4} \, dx=\int \frac {{\mathrm {tan}\left (c+d\,x\right )}^m\,\left (A+B\,\mathrm {tan}\left (c+d\,x\right )\right )}{{\left (a+b\,\mathrm {tan}\left (c+d\,x\right )\right )}^4} \,d x \]